From 8a789764cbdd776c1a2cd72bc4ed08cd7b586ed7 Mon Sep 17 00:00:00 2001 From: revisto Date: Tue, 23 Dec 2025 01:05:03 +0330 Subject: [PATCH] status/volume: Snap to 100% when over-amplification is enabled Sound may be distorted when overamplifying. It is therefore useful to make it easier for users to select exactly 100% when allow-volume-above-100-percent is enabled, as that is the highest non-distorted value. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7279 Part-of: --- js/ui/status/volume.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js index 0dbb2cefe..deadc16b7 100644 --- a/js/ui/status/volume.js +++ b/js/ui/status/volume.js @@ -235,8 +235,13 @@ const StreamSlider = GObject.registerClass({ _amplifySettingsChanged() { this._allowAmplified = this._soundSettings.get_boolean(ALLOW_AMPLIFIED_VOLUME_KEY); - this.slider.maximum_value = this._allowAmplified + const maxLevel = this._allowAmplified ? this.getMaxLevel() : 1; + this.slider.maximum_value = maxLevel; + + this.slider.clearMarks(); + if (this._allowAmplified) + this.slider.addMark(1); if (this._stream) this._updateVolume(); -- 2.39.5